package com.hoyo.service;

import com.hoyo.common.PageInfo;
import com.hoyo.domain.Bullet;
import com.hoyo.domain.Comment;
import com.hoyo.domain.ReportItem;

public interface BulletService{
//	{"movieId":5,"appearedTime":0,"content":"5465464548","color":"#fff","danmuType":"right"}
	/**
	 * 保存弹幕
	 * @param bullet
	 * @throws Exception
	 */
	void save(Bullet bullet) throws Exception;
	
	/**
	 * 保存弹幕举报内容
	 * @param account
	 * @param bulletId
	 * @param description
	 * @throws Exception
	 */
	void report(String account, int bulletId, String description) throws Exception;

	/**
	 * 分页获取被举报弹幕
	 * @param pageNum
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	PageInfo<ReportItem> pageFindReportBullets(int pageNum, int pageSize)throws Exception;
	
	/**
	 * 弹幕举报处理
	 * @param id
	 * @param userId
	 * @param actionType
	 * @return
	 * @throws Exception
	 */
	PageInfo<ReportItem> reportHandle(int id, int userId, int actionType)throws Exception;
	
	/**
	 * 分页获取所有弹幕
	 * @param pageNum
	 * @param pageSize
	 * @return
	 * @throws Exception
	 */
	PageInfo<Bullet> pageFindBullets(int pageNum, int pageSize)throws Exception;
	
	/**
	 * 弹幕删除
	 * @param id
	 * @return
	 * @throws Exception
	 */
	PageInfo<Bullet> removeOne(int id) throws Exception;
	
	/**
	 * 弹幕删除，且发布者被封号
	 * @param userId
	 * @param commentId
	 * @return
	 * @throws Exception
	 */
	PageInfo<Bullet> login4bid(int userId, int commentId) throws Exception;
	
	/**
	 * 弹幕删除，且发布者被禁止发送弹幕
	 * @param userId
	 * @param commentId
	 * @return
	 * @throws Exception
	 */
	PageInfo<Bullet> comment4bid(int userId, int commentId) throws Exception;
	
	Bullet findBulletById(int id);
}
